package org.gdpu.model;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 13-6-6
 * Time: 下午7:42
 * To change this template use File | Settings | File Templates.
 */

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

/**
 * 试题答案
 */
@Entity
public class TestAnswer {
    /**
     * 系统主键
     */
    private int id;
    /**
     * 答案（判断题可采用T或F ）
     */
    private String answer;
    /**
     * 答案解析
     */
    //TODO:扔到题目里
    private String answerKeys;

    @Id
    @GeneratedValue
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Column(length = 4000)
    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    @Column(length = 4000)
    public String getAnswerKeys() {
        return answerKeys;
    }

    public void setAnswerKeys(String answerKeys) {
        this.answerKeys = answerKeys;
    }

    public TestAnswer(String answer) {
        super();
        this.answer = answer;
    }

    public TestAnswer(String answerKeys, String answer) {
        this.answerKeys = answerKeys;
        this.answer = answer;
    }

    public TestAnswer() {
        super();
    }

    @Override
    public String toString() {
        return "answer:" + answer +
                "\n answerKeys:" + answerKeys + "\n";
    }
}
